package sctu.edu.java.year2016.team06.yuweimei.day20160521.chapter4_2;

/**编写Java程序，应用for循环打印出菱形。
 * Created by asus on 2016/5/25.
 */
public class Fan {
    public static void main(String[] args) {
        char lingxing[][]={{' ',' ','*',' ',' '},{' ','*','*','*',' '},{'*','*','*','*','*'},{' ','*','*','*',' '},{' ',' ','*',' ',' '}};
        int i;
        int j;
        for(i=0;i<5;i++)
        {
            for(j=0;j<5;j++)
            {
                System.out.print(lingxing[i][j]);
            }
            System.out.println("");
        }
    }
}


